#ifndef DungeonScene_h__
#define DungeonScene_h__

#include "Global.h"
#include "../TaskDesc.h"
#include "../TaskBoss.h"
#include "../TaskList.h"





class DungeonsScene
	: public State
	, public cocos2d::extension::CCBMemberVariableAssigner
	, public cocos2d::extension::CCBSelectorResolver
	, public cocos2d::extension::CCNodeLoaderListener
{
public:
	CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(DungeonsScene, create);
	DungeonsScene(void);
	~DungeonsScene(void);
	virtual SEL_MenuHandler onResolveCCBCCMenuItemSelector(CCObject * pTarget, CCString * pSelectorName){return NULL;}
	virtual SEL_CCControlHandler onResolveCCBCCControlSelector(CCObject * pTarget, CCString * pSelectorName){return NULL;}
	virtual bool onAssignCCBMemberVariable(CCObject * pTarget, CCString * pMemberVariableName, CCNode * pNode);
	virtual void onNodeLoaded(CCNode * pNode, CCNodeLoader * pNodeLoader);
private:
	TaskDesc* mTaskDesc;
	TaskBoss* mTaskBoss;
	TaskList* mTaskList;
	void playAwardAnim();
	void _onNotification(CCObject* object);
	void playAwardAnimComplete();
public:
	bool init();
	void onEnter();
	void onExit();
	void refresh();
};

#endif